package bit.pja.wolfkill.entity;

public class Record {
    private int fromId;
    private int toId;

    private int flag;

    public Record(int fromId, int toId, int flag) {
        this.fromId = fromId;
        this.toId = toId;
        this.flag = flag;
    }

    public int getFromId() {
        return fromId;
    }

    public void setFromId(int fromId) {
        this.fromId = fromId;
    }

    public int getToId() {
        return toId;
    }

    public void setToId(int toId) {
        this.toId = toId;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public static final int WOLF = 1;
    public static final int PROPHET_GOOD = 10;
    public static final int PROPHET_BAD = 11;
    public static final int WIZARD_POISON = 3;
    public static final int WIZARD_DRUG = 4;
    public static final int WIZARD_NO = 5;

    public static final int HUNTER = 6;
    public static final int VILLIGER = 7;



    @Override
    public String toString() {
        String str = String.format("%d号玩家对%d号玩家进行了操作：", fromId, toId);
        switch (getFlag()) {
            case WOLF:
                str += "狼杀";
                break;
            case PROPHET_GOOD:
                str += "预言家查验: 好人";
                break;
            case PROPHET_BAD:
                str += "预言家查验: 坏人";
                break;
            case WIZARD_POISON:
                str += "女巫毒";
                break;
            case WIZARD_DRUG:
                str += "女巫解药";
                break;
            case HUNTER:
                str += "猎人枪杀";
                break;
            case VILLIGER:
                str += "放逐投票";
                break;
        }
        return str;
    }
}
